<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets">
	<h:head>
		<title>用户角色管理</title>
		<meta http-equiv="content-type" content="text/html; charset=UTF-8"></meta>
		<script src="../js/jquery-1.7.1.min.js" type="text/javascript" />
		<script src="../js/jquery-ui-1.8.17.custom.min.js" type="text/javascript" />
		<link rel="stylesheet" type="text/css" href="../css/default/skin.css" />
		<link rel="stylesheet" type="text/css" href="../css/jquery-ui-1.8.17.custom.css" />
	</h:head>
	<h:body class="bodymargin">
	<h:form>
		<table width="100%">
			<tr>
				<td>
					
				</td>
			</tr>
			<tr>
				<td valign="top" align="left" class="mainLine" style="width: auto;">
					<span class="buttonLeft">
						<h:commandButton id="addBtn" action="editRoleInfo" value="新建"></h:commandButton>
					</span>
					<span class="buttonLeft">
						<h:commandButton id="delBtn" action="#{roleBean.addRole}" onclick="open_dialog();" value="删除">
						</h:commandButton>
						//http://www.jb51.net/article/24693.htm
						<a id="testDialog" value="testDialog" href="#">TestDialog</a>
					</span>
					<!-- 
					<span class="buttonLeft"><input type="button" id="addUser"
							value="分配用户" class="buttonRight" /> </span>
					<span class="buttonLeft"><input type="button"
							id="roleFunctionDeploy" value="分配功能" class="buttonRight" /> </span>
					<span class="buttonLeft"><input type="button" id="export"
							value="数据导出" class="buttonRight" /> </span>
					 -->
					<div class="uispTable">
						<!-- 
						<h:dataTable var="role" value="#{roleBean.roleList}" style="border:0;width:100%" cellpadding="0" cellspacing="1">
							<h:column>
				    			<f:facet name="header">No</f:facet>
				    			#{person.personList.rowIndex + 1}
				    		</h:column>
					 -->
						<table border="0" width="100%" cellpadding="0" cellspacing="1">
							<thead id="roledata_header">
								<tr>
									<td width="40px">
										<input type="checkbox" id="userSelectAll" />
									</td>
									<td>
										<span>用户角色</span>
									</td>
									<td>角色权限名</td>
									<td>
										<span>操作</span>
									</td>
								</tr>
							</thead>
							<tbody id="roledata_body">
								<ui:repeat var="role" value="#{roleBean.roleList}"  varStatus="status">
									<tr>
										<td><input id="roleId" type="checkbox" value="#{role.roleId}"/></td>
										<td>#{role.roleName}</td>
										<td></td>
										<td>
											<h:commandLink action="#{userBean.editUserInfo}" actionListener="#{userBean.attrListener}">
												<img src="../css/default/images/edit.gif" title="编辑"
													alt="编辑" border="0" />
												<f:param name="roleId" value="#{role.roleId}"></f:param>
											</h:commandLink>
											<h:commandLink 
												onclick="if(!RoleManagementSupport.confirm())return false;">
												<f:param name="roleId" value="#{role.roleId}"></f:param>
												<img
													src="../css/default/images/delete.gif" title="删除"
													alt="删除" border="0" />	
											</h:commandLink>
										</td>
									</tr>
							   </ui:repeat>
							</tbody>
						</table>
					</div>
				</td>
			</tr>
		</table>
		</h:form>
	</h:body>
	<script type="text/javascript" src="script/roleManageSupport.js"></script>
</html>
